import request from '@/utils/request'

// 查询【标准规范查询导出】列表
export function listSearch(query) {
    return request({
        url: '/result/searchExport/getList',
        method: 'get',
        params: query
    })
}


// 查询【标准规范查询导出】默认列表 oauth
export function listSearchOauth(query) {
    return request({
        url: '/result/searchExport/getListFromOauth',
        method: 'get',
        params: query
    })
}

// 查询【标准规范查询导出】列表 外部token访问
export function listSearchToken(query) {
    return request({
        url: '/result/searchExport/getListByToken',
        method: 'get',
        params: query
    })
}

// 导出【标准规范查询导出】单个信息
export function exportSearch(nid) {
    return request({
        url: '/result/searchExport/demo/export',
        method: 'get',
        params: {nid: nid},
        responseType: 'blob',
        headers: {
            "Content-Type": "multipart/form-data"
        }
    })
}

// 导出标准规范附件
export function getUploadFiles(nid) {
    return request({
        url: '/result/searchExport/uploadfiles/' + nid,
        method: 'get',

    })
}

// 查询评论列表数据
export function getCommentsList(query) {
    return request({
        url: '/result/searchExport/getCommentsList',
        method: 'get',
        params: query
    })
}

// 发表评论
export function postComment(query) {
    return request({
        url: '/result/searchExport/postComment',
        method: 'post',
        params: query
    })
}

export function checkOauthToken(query) {
    return request({
        url: '/result/searchExport/checkToken',
        method: 'post',
        params: query
    });
}


export function checkWebToken(query) {
    return request({
        url: '/result/searchExport/checkWebToken',
        method: 'post',
        params: query
    });
}
